package com.xdwanj.dao;

import com.xdwanj.pojo.Pet;
import com.xdwanj.util.PageBean;

public interface PetDao {
    /**
     * 查询所有宠物
     *
     * @return
     * @throws Exception
     */
    PageBean<Pet> findAll() throws Exception;

    /**
     * 根据宠物查主人
     *
     * @param name
     * @return
     * @throws Exception
     */
    PageBean<Pet> findUserByPetName(String name, int pageSize, int currentPageNo) throws Exception;

    /**
     * 根据宠物模糊查询
     *
     * @param name
     * @param pageSize
     * @param currentPageNo
     * @return
     * @throws Exception
     */
    PageBean<Pet> findPetListByName(String name, int pageSize, int currentPageNo) throws Exception;

    /**
     * 根据宠物查疫苗史
     *
     * @param name
     * @return
     * @throws Exception
     */
    PageBean<Pet> findVacHistoryByPetName(String name, int pageSize, int currentPageNo) throws Exception;

    /**
     * 根据宠物名查宠物数据
     *
     * @param id
     * @return
     * @throws Exception
     */
    Pet findPetById(int id) throws Exception;

    /**
     * 添加宠物
     *
     * @param pet
     * @return
     * @throws Exception
     */
    int addPet(int u_id, Pet pet) throws Exception;

    /**
     * 修改宠物
     *
     * @param pet
     * @return
     * @throws Exception
     */
    int updatePet(Pet pet) throws Exception;

    /**
     * 删除宠物
     *
     * @param id
     * @return
     * @throws Exception
     */
    int deletePet(int id) throws Exception;
}
